﻿#ifndef BASESTATE_H
#define BASESTATE_H

#include "ObjLib_global.h"

namespace xvs {

struct OBJLIB_EXPORT BaseState
{
public:
    // 判断是否第一次执行
    bool IsFirstTime()
    {
        bool result = mIsState;
        mIsState = false;
        return result;
    }
    void resetFirstTime()
    {
        mIsState = true;
    }

public:
    BaseState()
        :mIsState(true)
    {}

private:
    bool mIsState;
};

}

#endif // BASESTATE_H
